//    Copyright (C) Kherty.  All rights reserved.
namespace OpenLS.Chart.UI
{
    struct Bounds
    {
        public double Delta
        {
            get { return High - Low; }
        }
        public double Mid { get { return (High + Low)/2; } }


        public double Low { get; set; }

        public double High { get; set; }

        public static Bounds Create(double low, double high)
        {
            if (high < low)
                return Create(high, low);
            var result = new Bounds {Low = low, High = high};
            return result;
        }
    }
}
